/*解压*/

$(function () {

    //解压[关键属性]项
    $('.key-prop').each(function (i, dom) {
        var $this = $(dom);
        //获得标题和内容
        var title = $this.attr('heading');
        var text = $this.attr('text');
        //创建并插入元素
        var html =
            '<h4 class="list-group-item-heading">' + title + '</h4>' +
            '<p class="list-group-item-text">' + text + '</p>'
        $this.append($(html));
    });

    //解压项目经验[标签]
    $('.lables').each(function (i, dom) {
        var $this = $(dom);
        //获取标签列表
        var lables = $this.attr('lables').split(',');
        //按顺序生成标签
        var labDom = '';
        for (var i = 0; i < lables.length; i++) {
            labDom += '<span class="label label-custom">' + lables[i] + '</span> ';
        }
        $this.prepend($(labDom));
    });
});
